package GameServer

import (
	"PBMessage"
)

var msgId2Module map[uint16]int

func initID2Module() {
	msgId2Module = make(map[uint16]int)
	msgId2Module[PBMessage.PBID_CS_Login] = MODULE_SREVER
	msgId2Module[PBMessage.PBID_CS_GameHallTick] = MODULE_HAll
	msgId2Module[PBMessage.PBID_CS_CancelMatch] = MODULE_HAll
	msgId2Module[PBMessage.PBID_CS_MatchGame] = MODULE_HAll
	msgId2Module[PBMessage.PBID_CS_SynRoomPlayerState] = MODULE_HAll
}

func GetModuleByID(id uint16) IModule {
	return moduleMap[msgId2Module[id]]
}
